package cn.hackcloud.concurrency.activeobjects;

import cn.hackcloud.concurrency.activeobject.OrderService;
import cn.hackcloud.concurrency.activeobject.OrderServiceImpl;
import cn.hackcloud.concurrency.future.Future;

public class Test {
    public static void main(String[] args) throws InterruptedException {
        OrderService orderService = ActiveServiceFactory.active(new OrderServiceImpl());
        Future<String> future = orderService.findOrderDetails(1000);
        System.out.println("i will be returned immediately");
        System.out.println(future.get());
    }

}
